﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using RESTServices.Dominio;
using System.ServiceModel.Web;

namespace RESTServices
{
    [ServiceContract]
    public interface IPersonales
    {
        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Personales/{codigo}", ResponseFormat = WebMessageFormat.Json)]
        Personal ObtenerPersonal(string codigo);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Personales", ResponseFormat = WebMessageFormat.Json)]
        List<Personal> ListarPersonales();

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Personales", ResponseFormat = WebMessageFormat.Json)]
        Personal RegistrarPersonal(Personal oPersonal);

        [OperationContract]
        [WebInvoke(Method = "DELETE", UriTemplate = "Personales", ResponseFormat = WebMessageFormat.Json)]
        void EliminarPersonal(string codigo);

    }
}
